Assignemnt #25 and twenty-second Program
Code
///Name: Derrick Andreasen
///Period: 7
///Program name: Twenty-second Program
///File name: TwesProg.java
///Date Finished:9/24/2015
import java.util.Scanner;
public class TwesProg
{
public static void main( String[] args )
{
int fNumber, sNumber, tNumber, lNumber, rNumber;
Scanner keyboard = new Scanner(System.in);
System.out.print( " What is your first number? " );
fNumber = keyboard.nextInt();
System.out.print( " What is your second number? " );
sNumber = keyboard.nextInt();
System.out.println( " What is your third number? " );
tNumber = keyboard.nextInt();
lNumber = fNumber + sNumber + tNumber;
rNumber = lNumber / 2;
System.out.println( + fNumber + " + " + sNumber + " + " + tNumber + " divided by 2 is... " + rNumber );
}
}
Picture of the output